<template>
  <div>
    <div class="left">
      <SellDog
        v-for="(item, index) in arr"
        :key="index"
        :obj="item"
         @selectFn="selectFn"
      />
    </div>
    <div class="right">
      <LikeDog :arr="likeDog"/>
    </div>
  </div>
</template>
 
<script>
import SellDog from '@/components/SellDog'
import LikeDog from '@/components/LikeDog'
export default {
  components: {
    SellDog,
    LikeDog
  },
  data() {
    return {
      arr: [
        {
          dogImgUrl:
            'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimgx.xiawu.com%2Fxzimg%2Fi4%2Fi2%2FTB1VQ_RIXXXXXcCXFXXXXXXXXXX_%21%210-item_pic.jpg&refer=http%3A%2F%2Fimgx.xiawu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1666438349&t=45f2aee6734df25807142e1229cc3d37',
          dogName: '博美'
        },
        {
          dogImgUrl:
            'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn15%2F266%2Fw640h426%2F20180521%2F21ac-hawmaua0330091.jpg&refer=http%3A%2F%2Fn.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1666067693&t=2fbc016469024dccc045bf745bfce29e',
          dogName: '泰迪'
        },
        {
          dogImgUrl:
            'https://img2.baidu.com/it/u=1826987301,999600856&fm=253&fmt=auto&app=138&f=JPEG?w=802&h=500',
          dogName: '金毛'
        },
        {
          dogImgUrl:
            'https://pic1.zhimg.com/80/v2-7ba4342e6fedb9c5f3726eb0888867da_1440w.jpg?source=1940ef5c',
          dogName: '哈士奇'
        },
        {
          dogImgUrl:
            'https://img2.baidu.com/it/u=2903102149,2764730663&fm=253&fmt=auto&app=138&f=JPEG?w=634&h=500',
          dogName: '阿拉斯加'
        },
        {
          dogImgUrl:
            'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F11932586474%2F641.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1666067841&t=de7075672a58d98f86cc621c34c704c6',
          dogName: '萨摩耶'
        }
      ],
      likeDog: []
    }
  },
  methods: {
    selectFn(name) {
      this.likeDog.push(name)
    }
  }
}
</script>
<style scoped>
  .left {
    float:  left;
    width: 940px;
    margin-right: 10px;
  }
  .right {
    float: left;
    width: 500px;
    min-height: 547px;
    border: 1px solid #000;
    text-align: center;
    font-size: 40px;
  }
</style>